package generator.thread;

import generator.driver.GeneratorStatistics;
import generator.structure.Pair;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.CountDownLatch;

public class OverlapThread implements Runnable{

	CountDownLatch latch;
	
	ArrayList<Integer> columnArray;
	ArrayList<Pair<Pair<String, String>, Integer>> al;
	ArrayList<HashMap<String, ArrayList<Pair<Pair<String, String>, Integer>>>> HashArray;
	
	int isFast;
	int ldaFlag = 0;
	int whichGroup;
	
	public OverlapThread(CountDownLatch latch, int isFast, int ldaFlag, int i) {
		this.isFast = isFast;
		this.ldaFlag = ldaFlag;
		this.latch = latch;
		this.whichGroup = i;
	}
	
	@Override
	public void run() {

		if(isFast == 0)
			GeneratorStatistics.overlap.LDAcompute(whichGroup);
		else
			GeneratorStatistics.overlap.LDAfastCompute(whichGroup);

		latch.countDown();
	}

}
